package com.demo.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@ApiModel
public class Category {
    @ApiModelProperty("编号")
    //@NotNull(message = "id can't is null")

    private int id;

    @ApiModelProperty(value = "姓名")
	@NotBlank(message = "name is blank")
	@NotNull(message = "name is null")
	@NotEmpty(message = "name is empty")
    private String name;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Category [id=" + id + ", name=" + name + "]";
    }


}
